package com.ruoyi.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 水果列表对象 fruit
 * 
 * @author ruoyi
 * @date 2023-11-11
 */
public class Fruit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private String id;

    /** 水果名字 */
    @Excel(name = "水果名字")
    private String name;

    /** 水果描述 */
    @Excel(name = "水果描述")
    private String description;

    /** 水果价格 */
    @Excel(name = "水果价格")
    private BigDecimal price;

    /** 水果照片 */
    @Excel(name = "水果照片")
    private String image;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }
    @NotBlank(message = "水果名称不能为空")
    @Size(min = 0, max = 5, message = "水果名称长度不能超过5个字符")
    public String getName() 
    {
        return name;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setImage(String image) 
    {
        this.image = image;
    }

    public String getImage() 
    {
        return image;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("description", getDescription())
            .append("price", getPrice())
            .append("image", getImage())
            .toString();
    }
}
